<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>8002:端口</title>
<link rel="stylesheet" th:href="@{/moon/css/bootstrap.css}" />
<link rel="stylesheet" th:href="@{/icon/css/font-awesome.min.css}" />
</head>
<body class="bg-a">
	<div class="container-fluid" id="app">
		<div class="row">
			<div class="col text-center bg-warning text-white shadow">cookieTokenLogin</div>
		</div>
		<div class="row">
			<div class="col"></div>
			<div class="card col">
				<div class="card-body">
					<div class="form-group">
						<label for="account" class="col-sm-2 control-label text-info">账号</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" id="account"
								placeholder="请输入账号">
						</div>
					</div>
					<div class="form-group">
						<label for="password" class="col-sm-2 control-label text-info">密码</label>
						<div class="col-sm-10">
							<input type="password" class="form-control" id="password"
								placeholder="请输入密码">
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button class="btn btn-warning mt-2" onclick="login()">登录</button>
							</div>
						</div>

					</div>
				</div>
			</div>
			<div class="col"></div>
		</div>
	</div>
	<!-- js -->
	<script th:src="@{/moon/js/jquery.js}"></script>
	<script th:src="@{/moon/js/vue.js}"></script>
	<script th:src="@{/layer/layer.js}"></script>
	<script th:inline="javascript">
	function login(){
			$.post("/yao/Bloger/loginBlogerByNameAndPassword",{account:$("#account").val(),password:$("#password").val()},(data)=>{
				if(data=="success"){
					alert("成功！");
					window.location.href='/';
				}else{
					alert("失败！");
				}
			})
		};

	</script>
</body>
</html>